Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/backend/session management for auth #69

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

waveyboym
Copy link
Member

@waveyboym waveyboym commented Jun 17, 2024

Description

This update aims to introduce session and JWT management for users along with protected routes

Fixes # (issue)
#68

Type of change

Authentication and security

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Some middleware test functions were written in tests/middleware_tests.go
  • Some tests were written in tests/authenticator_test.go
  • Postman was used to verify that the new endpoints do indeed work as intended

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@waveyboym waveyboym added type: chore Just a cleanup or minor update type: feature A new feature type: fix Introduces a fix for a previous issue type: security This is a security related issue/pr type: testing This affects one or more tests For: api This is mainly for the api For: backend This is mainly for the backend code priority: critical This needs/needed to be addressed immediately status: pending This is awaiting approval effort: 5 This may require/required hours of work type: task Task request labels Jun 17, 2024
@waveyboym waveyboym added this to the Demo two milestone Jun 17, 2024
@waveyboym waveyboym self-assigned this Jun 17, 2024
@waveyboym waveyboym linked an issue Jun 17, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 59.25926% with 33 lines in your changes missing coverage. Please review.

Project coverage is 72.38%. Comparing base (f9b66fe) to head (59439a7).
Report is 24 commits behind head on develop.

Files Patch % Lines
occupi-backend/pkg/middleware/middleware.go 50.90% 25 Missing and 2 partials ⚠️
occupi-backend/pkg/authenticator/auth.go 76.92% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop      #69       +/-   ##
============================================
+ Coverage    19.15%   72.38%   +53.22%     
============================================
  Files            6        5        -1     
  Lines          496      210      -286     
============================================
+ Hits            95      152       +57     
+ Misses         397       50      -347     
- Partials         4        8        +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@waveyboym waveyboym marked this pull request as ready for review June 17, 2024 23:01
@waveyboym waveyboym merged commit ae2eea8 into develop Jun 17, 2024
6 checks passed
@waveyboym waveyboym deleted the fix/backend/session-management-for-auth branch June 19, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: 5 This may require/required hours of work For: api This is mainly for the api For: backend This is mainly for the backend code priority: critical This needs/needed to be addressed immediately status: pending This is awaiting approval type: chore Just a cleanup or minor update type: feature A new feature type: fix Introduces a fix for a previous issue type: security This is a security related issue/pr type: task Task request type: testing This affects one or more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Authentication does not manage sessions correctly
1 participant